package com.wyy.web;

import com.wyy.pojo.Comments;
import com.wyy.pojo.model.CommentQuery;
import com.wyy.response.CommonReturnType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @program: gytcb
 * @author: 吴磊
 * @create: 2021-06-05 13:10
 */
@FeignClient(name = "gytcb-comment", fallback = CommentFeignActionFallBack.class)
public interface CommentFeignAction {
    /**
     * 用户进行评论
     *
     * @param comments
     * @return
     */
    @RequestMapping(value = "/insertComment", method = RequestMethod.POST)
    CommonReturnType tokenInsertComment(Comments comments);

    /**
     * 用户删除评论
     *
     * @param comments
     * @return
     */
    @RequestMapping(value = "/deleteComment", method = RequestMethod.POST)
    CommonReturnType tokenDeleteComment(Comments comments);

    /**
     * 获取评论
     *
     * @param commentQuery
     * @return
     */
    @RequestMapping(value = "/getCommentBySomething", method = RequestMethod.POST)
    CommonReturnType getCommentByArticleIdOrUserId(CommentQuery commentQuery);

}